<template>
  <div>注册页</div>
</template>

<script>
import router from "@router/index.js" 
import { reactive, toRefs } from '@vue/reactivity'
import {$Storage} from "@utils/storage.js"
export default {
    setup(){
        const {isRegister,token} = router.currentRoute.value.query
        const state = reactive({
            isRegister,
            token
        })

        if(state.isRegister === "1"){
            $storage.setItem("jwtToken",token)
            router.push("/home")
        }
        
        return{
            ...toRefs(state)
        }
    }
}
</script>

<style>

</style>